import pandas as pd
df = pd.DataFrame({'商品': ['苹果', '香蕉', '梨','香蕉'],
                   '单价(元)': [4, 5, 4,5],
                   '销量(kg)': [100,120, 105,120],
                   '库存(kg)': [50, 60, 70,60]})
print('\n',df)
print('\n',df.drop_duplicates('单价(元)'))
print('\n',df.drop_duplicates('单价(元)',keep='last'))
print('\n',df.drop_duplicates())
print('\n',df.drop_duplicates(keep=False))
print('\n',df.drop_duplicates(keep=False,ignore_index=True))